Skip to content

refactor: simplify PR close flow with deterministic workspace state updates#106

Merged
knightedcodemonkey merged 5 commits intonextfrom
bananas
May 1, 2026
Merged

refactor: simplify PR close flow with deterministic workspace state updates#106
knightedcodemonkey merged 5 commits intonextfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Copy Markdown
Owner

docs: align with current implementation.

Copilot AI review requested due to automatic review settings May 1, 2026 17:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the PR close/verification flows so workspace/PR-context state updates are more deterministic and aligned with the “persist on successful workflow outcomes” boundary, and updates docs/tests accordingly.

Changes:

  • Extend PR close actions to return a preserved PR title and use it when persisting closed records.
  • Introduce workspace-save flags to explicitly allow workspace identity mutation (and add new close-flow guards/UI disablement).
  • Update Playwright scenarios and documentation to reflect the current close/persistence behavior and restore selection logic.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/modules/github/pr/drawer/controller/public-actions.js Aborts pending verification on context clear; returns prTitle from close API result.
src/modules/app-core/workspace-scope-fork-actions.js Flushes workspace save with explicit identity-mutation allowance for scope sync.
src/modules/app-core/workspace-save-controller.js Adds snapshot/save flags for identity mutation and optional prune behavior.
src/modules/app-core/workspace-pr-session-handoff-controller.js Seeds fresh-local entry tab with default content; removes stale-active cleanup during archive.
src/modules/app-core/pr-context-transition.js Simplifies PR-context transition logic by removing “mark-inactive” path.
src/modules/app-core/pr-context-state-change-handler.js Aligns state-change handler with simplified transition model.
src/modules/app-core/pr-context-records.js Persists matching active/closed records as closed, preserving/setting titles.
src/modules/app-core/github-workflows.js Ensures workspace identity fields are updated on open PR; prevents double-close via UI disabling/guard.
src/app.js Reorders PR context clearing on workspace apply; persists closed-record updates with fallback title logic.
playwright/github-pr-drawer/github-pr-drawer.helpers.ts Tightens integrity expectations to require exact prContextState matches.
playwright/github-pr-drawer/active-context-switch.spec.ts Updates UI expectations for close flow and verifies prTitle preservation.
docs/pr-context-storage-matrix.md Documents restore fallback + persistence boundary + updated close behavior semantics.
docs/idb-workspace-state.md Adds PR metadata persistence boundary to IDB ownership spec.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/modules/app-core/github-workflows.js
Comment thread src/modules/app-core/github-workflows.js Outdated
Comment thread src/modules/app-core/pr-context-records.js
@knightedcodemonkey knightedcodemonkey merged commit 71bdbd0 into next May 1, 2026
10 of 11 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch May 1, 2026 18:36
knightedcodemonkey added a commit that referenced this pull request May 2, 2026
* feat: idb infrastructure. (#63)

* feat: dynamic tabs. (#64)

* refactor: better accessbility for tabs. (#68)

* feat: remove allow-same-origin for better security. (#69)

* feat: tab reordering via drag-n-drop. (#70)

* feat: explicit css imports, diagnostics per editor buffer. (#71)

* feat: idb + github sync with atomic open and push to remote. (#78)

* closes #73, closes #74, closes #75.

* refactor: more colocation and smaller file sizes. (#79)

* refactor: improvements with styles and gh syncs. (#82)

* test: webkit flake. (#83)

* test: address flake. (#84)

* refactor: github pr context. (#85)

* fix: require app in entry, hide workspaces without pat, remove star important. (#86)

* feat: make idb source of truth for pr context. (#87)

* fix: active pr context on reload and dedupe workspace identity. (#88)

* fix: edited and push sync across reloads. (#89)

* fix: properly commit tab name changes. (#90)

* fix(tabs): filename edits, min-widths, scrolling, content sync. (#91)

* feat: improved workspace disconnect and closed ux. (#92)

* refactor: status styling and biome config. (#94)

* fix(diagnostics): enforce current-editor snapshots and stale results. (#95)

* fix: consistent head handling. (#96)

* fix: prevent workspace overwrites. (#100)

* fix(playwright): stabilize lint diagnostics waits with one-time rerun fallback. (#101)

* feat: improved workspace ux and state identity separation.  (#103)

* fix: iframe protocol mismatch in receiver reads. (#104)

* refactor: remove remaining fixed editor assumptions. (#105)

* refactor: simplify PR close flow with deterministic workspace state updates (#106)

* feat: mode-aware entry tab extensions. (#108)

* feat: workspace status bar. (#109)

* feat: tab-scoped ai chat. (#111)

* refactor: better workspace drawer ux. (#112)

* refactor: remove collapsible editors and update breakpoint styles. (#113)

* docs: update for vnext. (#114)

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants